/**
 * Converts all px values in $list to em values based on $context.
 * @param  {List} $list   List of values.
 * @return {List}         List of modified values.
 */
@function list-px-to-em($list, $context) {
  @for $i from 1 through length($list) {
    $value: nth($list, $i);
    @if(type-of($value) == number and unit($value) == px) {
      $list: set-nth($list, $i, px-to-em($value, $context));
    }
  }
  @return $list;
}